﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using WebSite1.DataSet1TableAdapters;
using WebSite1.DataSet2TableAdapters;

public partial class wedd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    
    protected void Button1_Click1(object sender, EventArgs e)
    {
        if (Session["UserID"] == null)
        {
            Generic_Data_Cheker gench = new Generic_Data_Cheker();
            int newuserid = (int)gench.UserIDIdentity("", "", "", "", "", "", "Guest", " ", "Anonynouse user");
            Session["UserID"] = newuserid.ToString();

        }
        wishlistsTableAdapter a = new wishlistsTableAdapter();
        wedding_dataTableAdapter weddata = new wedding_dataTableAdapter(); 
        int newwhishlistid = (int)a.InsertQuery(DateTime.Now, "My Whishlist", 1);
        user_whishlistTableAdapter u = new user_whishlistTableAdapter();
        u.Insert(Int32.Parse(Session["UserID"].ToString()), newwhishlistid);
        //string a2 = male_fname_TextBox.Text;
        
        //weddata.Insert(male_fname_TextBox.Text)
        Session["CurrentWishListID"] = newwhishlistid;
        Response.Redirect("whishlist.aspx");
       
       
    }

    protected void male_fname_TextBox_TextChanged(object sender, EventArgs e)
    {
        
    }
}